package com.qinxueit.admin.utils;

import com.baomidou.mybatisplus.core.incrementer.DefaultIdentifierGenerator;
import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;

/**
 * 描述: ID生成
 */
public class IDhelper {
    //用mybatis-plus生成Long ID
    public static Long getNextId(String bizKey) {
        IdentifierGenerator identifierGenerator = new DefaultIdentifierGenerator();
        Number id = identifierGenerator.nextId(bizKey);
        Long nextid = Long.parseLong(id + "");
        return nextid;
    }
}
